import { $t } from "@/plugins/i18n";
import { business } from "@/router/enums";

export default {
  path: "/business",
  redirect: "/business/user/list",
  meta: {
    title: $t("menus.pureBusiness"),
    icon: "ep:histogram",
    rank: business
  },
  children: [
    {
      path: "/business/user",
      meta: {
        title: $t("menus.pureBusinessUser"),
        keepAlive: true
      },
      redirect: "/business/user/list",
      children: [
        {
          path: "/business/user/list",
          component: () => import("@/views/business/user/list/index.vue"),
          name: "UserList",
          meta: {
            title: $t("menus.pureBusinessUserList"),
            keepAlive: true
          }
        },
        {
          path: "/business/user/register",
          component: () => import("@/views/business/user/block/index.vue"),
          name: "UserBlock",
          meta: {
            title: $t("menus.pureBusinessUserBlock"),
            keepAlive: true
          }
        }
      ]
    },
    {
      path: "/business/register",
      meta: {
        title: $t("menus.pureBusinessRegister"),
        keepAlive: true
      },
      redirect: "/business/register/list",
      children: [
        {
          path: "/business/register/friend",
          component: () => import("@/views/business/register/friend/index.vue"),
          name: "RegisterFriend",
          meta: {
            title: $t("menus.pureBusinessRegisterFriend"),
            keepAlive: true
          }
        },
        {
          path: "/business/register/group",
          component: () => import("@/views/business/register/group/index.vue"),
          name: "RegisterGroup",
          meta: {
            title: $t("menus.pureBusinessRegisterGroup"),
            keepAlive: true
          }
        }
      ]
    }
  ]
} satisfies RouteConfigsTable;
